package com.example.zxw;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.zxw.test.TestKotlinAnnotation;

public class TestActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TestKotlinAnnotation.INSTANCE.test();
        TextView tv = new TextView(this);
        tv.setText("1");
        tv.setBackgroundColor(Color.GRAY);
        setContentView(tv);
        ViewGroup.LayoutParams layoutParams = tv.getLayoutParams();
        layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT;
        layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT;
        tv.setLayoutParams(layoutParams);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(TestActivity.this,ZxwMainActivity.class));
            }
        });
    }
}
